package testing;

public class ShiftTesting
{
	public static void main(String[] args)
	{
		byte[] res = new byte[4];
		int src = 0xff, temp, mask;
		int t = 8;
		src += 1 << t;
		mask = -1 >>> (8 * 3);
		for (int i = 0; i < 4; i++)
		{
			temp = mask & src;
			temp = temp >> (8 * i);
			res[3 - i] = (byte) temp;
			mask = mask << 8;
		}
		System.out.println(res[0] + "  " + res[1] + "  " + res[2] + "  " + res[3]);
	}
}
